# Repository instructions for 
# Why Political Connections Can Impede Investment
# By Robert Kubinec, Na-Kyung (Haillie) Lee and Andrey Tomashevskiy
# Comparative Political Studies (2023)

This repository contains code and data to reproduce the results from the above-cited paper. The repository uses four code files that run in R and also makes use of the Stan Markov Chain Monte Carlo sampler, which can be installed with the R package `brms`. We recommend, though it isn't required, to also install the `cmdstanr` package (https://mc-stan.org/cmdstanr/) to use a more up-to-date version of Stan and also make use of parallel processing to speed up sampling.

The Latex file for the paper, experimental_rr_cps.tex, is included as a reference for which files are used for which figures. To reproduce all figures from the paper, run the script analyze_data_v2.R. This file calls the data processing script prepare_data.R and also loads the ordbetareg model in the define_ord_betareg.R script. (Note that this is a legacy script and ordbetareg models can be more easily run using the R package ordbetareg.) The code saves all figures and tables in the root directory.

The survey data can be found in the data/qual_data.rds file. This file has most of the original data but some variables have been removed to protect anonymity. All of the data used in the origional paper is included. Removed variables include estimated location, IP addresses, start and end dates for survey completion, and political affiliation of the CEO (and whether the respondent is a CEO). If there is some need to examine these variables, please contact the corresponding author Robert Kubinec at rmk7@nyu.edu.